package ita.class1.group2.supermarket.administrator.service;

import ita.class1.group2.supermarket.administrator.dao.UserDao;
import ita.class1.group2.supermarket.administrator.pojo.User;
import ita.class1.group2.supermarket.common.annotation.Autowired;
import ita.class1.group2.supermarket.common.annotation.Component;
import ita.class1.group2.supermarket.common.service.BaseService;
import java.util.List;
import java.util.Map;

@Component
public class UserService implements BaseService<User, String> {

    @Autowired
    private UserDao userDao;

    @Override
    public User find(String s) {
        return userDao.find(s);
    }

    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }

    @Override
    public User save(User user) {
        return userDao.save(user);
    }

    @Override
    public boolean delete(String s) {
        return userDao.delete(s);
    }

    @Override
    public List<User> findByCondition(Map map) {
        return userDao.findByCondition(map);
    }

    @Override
    public boolean update(User user) {
        return userDao.update(user);
    }


}
